using System;

namespace AspNetForums.WebServices
{
	/// <summary>
	/// Summary description for SerializableForum.
	/// </summary>
	[Serializable]
	public class SerializableForum
	{
		public SerializableForum()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		public SerializableForum( Components.Forum forum )
		{
			this.forumID = forum.ForumID;
			this.Name = forum.Name;
			this.Description = forum.Description;
			if( forum.Forums != null )
			{
				this.subForums = new SerializableForum[forum.Forums.Count];
				for( int i = 0; i < subForums.Length; i++ )
				{
					subForums[i] = new SerializableForum( (Components.Forum)forum.Forums[i] );
				}
			}
		}
		
		public int ForumID
		{
			get{return forumID;}
			set{forumID = value;}
		} private int forumID;

		public string Name
		{
			get{return subject;}
			set{subject = value;}
		} private string subject;

		public string Description
		{
			get{return body;}
			set{body = value;}
		} private string body;

		public SerializableForum[] SubForums
		{
			get{return subForums;}
			set{subForums = value;}
		} private SerializableForum[] subForums;
		
	}
}
